package com.sxs.controller;

import com.sxs.annotation.RateLimit;
import com.sxs.enums.LimitType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @RateLimit(time = 10, count = 2, limitType = LimitType.IP)
    @GetMapping("/hello")
    public String hello() {
        return "hello world";
    }
}
